package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.Catalog2VO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author crh
 * @email nice235@163.com
 * @date 2024-12-28 20:56:53
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    // 生产菜单树结构
    List<CategoryEntity> listWithTree();

    // 根据id删除分类
    void removeMenuByIds(List<Long> list);

    /**
     * 找到 catelogId 的完整路径
     * [父/子/孙]
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catalog2VO>> getCatalogJson();
}

